Data warehouse application environments are well known in the art. The environment typically comprises a database, which stores base tables and a catalog, and a database management system with a processor, which processes queries on the base tables. The catalog contains information about the set of tables and views maintained by the database manager. Views are logical tables that contain data that is generated by a query. In such an environment, operational business data stored in base tables are usually huge in volume. To improve performance in decision support or on-line analytic processing (OLAP) queries, the data are frequently summarized and stored in pre-computed “materialized” views. Materialized views are also known as summary tables, materialized query tables, and indexed views. A materialized view contains two parts: a materialized view definition and a stored result of the view. For a given query on base tables, a database engine searches for materialized views that may provide a result for the query. For a given query, a query rewrite matching algorithm is performed on the materialized views to determine which would satisfy the query. In this manner, a search of the base tables themselves is avoided, achieving performance gain.
However, to satisfy diverse query requirements, many materialized views are required. Thus, the number of materialized view candidates can still be large. The performance of the query rewrite matching algorithm on the materialized views can be time consuming and expensive.
Accordingly, there exists a need for a method and system for efficiently identifying materialized view candidates for queries. The method and system should provide early rejection of unqualified materialized view prior to the performance of the query rewrite matching algorithm. The present invention addresses such a need.